JSON Support Summary

The following list summarizes objects supported under JSON. To create any of these objects and define their properties, refer to the Defining JSON Objects section.

Following are the supported data types:

  • Object

  • Array

  • Null

  • Integer

  • Number

  • String

  • Boolean

Refer to JSON documentation for detailed information. erwin® Data Modeler documentation for the property editors provides brief descriptions of the controls on each dialog box and tab, which you can use as a point of reference while working with database design features.
For reverse engineering German language JSON scripts, ensure the script Encoding is set to Convert to ANSI.

Defining JSON Objects

Follow these steps to create JSON objects and define their properties:

  1. In the Model Explorer, right-click the required object and click New.
    An instance of the object is created.
  2. Right-click the newly created instance and click Properties.
    The object's property editor opens.
  3. Set the values of all the required properties.
    For information on properties, refer to the corresponding object's property page from the above list.
  4. Click Close.
    The object is created and the required properties are set.

Creating JSON Definition Libraries Using Predefined Fields

Follow these steps to create definition fields and define their properties:

  1. In the Model Explorer, double-click the object where you want to create a definition library.
  2. Right-click the Fields node and click New.
    An instance of the field is created.
  3. Name the field as $Defs.
  4. Right-click the $Defs field and click Properties.
    The field's property editor opens.
  5. On the General tab, set the values of all the required properties.
    Physical Data Type

    Specifies the data type for fields. Set this to Object for $Defs fields.

    Definition Type

    Specifies the definition type of the field. This option is available only for the $Defs fields and includes the following options:

    • External: Select this option to apply the definition to fields across all objects in the model.

    • Internal: Select this option to apply the definition only to the fields within the object they were created in.

  6. Right-click the $Defs field and click New.
  7. An instance of the definition is created.

  8. Name the definition as required.
  9. Similarly, you can create a list of definitions.

For information on properties, refer to the Defining JSON Fields topic.

The Physical Data Type for the $Defs fields must be Object. And a JSON object cannot contain both internal and external definitions.

Assigning JSON Definitions to Fields

Follow these steps to assign a JSON definition to fields:

  1. In the JSON Field Editor, right-click the required field node and click $Defs. The $Defs list appears.
  2. Select the definition you want to use and then click OK.

The selected definition is assigned to the field. When you select the field, the Ref property displays the assigned definition.